<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::QuantizedNormalLookUpTable结构体 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structpcl_1_1_quantized_normal_look_up_table.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="structpcl_1_1_quantized_normal_look_up_table-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::QuantizedNormalLookUpTable结构体 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Look-up-table for fast surface normal quantization.  
 <a href="structpcl_1_1_quantized_normal_look_up_table.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="surface__normal__modality_8h_source.html">surface_normal_modality.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a4f81c47eb0b6efaa389b4de6b926ace8"><td class="memItemLeft" align="right" valign="top"><a id="a4f81c47eb0b6efaa389b4de6b926ace8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a4f81c47eb0b6efaa389b4de6b926ace8">QuantizedNormalLookUpTable</a> ()</td></tr>
<tr class="memdesc:a4f81c47eb0b6efaa389b4de6b926ace8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a4f81c47eb0b6efaa389b4de6b926ace8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c14b12d6bfc1ea927a0433d7625afa"><td class="memItemLeft" align="right" valign="top"><a id="a55c14b12d6bfc1ea927a0433d7625afa"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a55c14b12d6bfc1ea927a0433d7625afa">~QuantizedNormalLookUpTable</a> ()</td></tr>
<tr class="memdesc:a55c14b12d6bfc1ea927a0433d7625afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a55c14b12d6bfc1ea927a0433d7625afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3720afaa1a28cc7d0c985ef6ba8b9ed7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a3720afaa1a28cc7d0c985ef6ba8b9ed7">initializeLUT</a> (const int range_x_arg, const int range_y_arg, const int range_z_arg)</td></tr>
<tr class="memdesc:a3720afaa1a28cc7d0c985ef6ba8b9ed7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the LUT.  <a href="structpcl_1_1_quantized_normal_look_up_table.html#a3720afaa1a28cc7d0c985ef6ba8b9ed7">更多...</a><br /></td></tr>
<tr class="separator:a3720afaa1a28cc7d0c985ef6ba8b9ed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cd6a5749e1c5563eab97da895f7cb08"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a4cd6a5749e1c5563eab97da895f7cb08">operator()</a> (const float x, const float y, const float z) const</td></tr>
<tr class="memdesc:a4cd6a5749e1c5563eab97da895f7cb08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator to access an element in the LUT.  <a href="structpcl_1_1_quantized_normal_look_up_table.html#a4cd6a5749e1c5563eab97da895f7cb08">更多...</a><br /></td></tr>
<tr class="separator:a4cd6a5749e1c5563eab97da895f7cb08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab47ece678e8ab9805b80c9772530e689"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#ab47ece678e8ab9805b80c9772530e689">operator()</a> (const int index) const</td></tr>
<tr class="memdesc:ab47ece678e8ab9805b80c9772530e689"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator to access an element in the LUT.  <a href="structpcl_1_1_quantized_normal_look_up_table.html#ab47ece678e8ab9805b80c9772530e689">更多...</a><br /></td></tr>
<tr class="separator:ab47ece678e8ab9805b80c9772530e689"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:af828a47f2a5a7e6df1896f4acec6f7a4"><td class="memItemLeft" align="right" valign="top"><a id="af828a47f2a5a7e6df1896f4acec6f7a4"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#af828a47f2a5a7e6df1896f4acec6f7a4">range_x</a></td></tr>
<tr class="memdesc:af828a47f2a5a7e6df1896f4acec6f7a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The range of the LUT in x-direction. <br /></td></tr>
<tr class="separator:af828a47f2a5a7e6df1896f4acec6f7a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e8c0d25ae7c8eca843543199354ce16"><td class="memItemLeft" align="right" valign="top"><a id="a5e8c0d25ae7c8eca843543199354ce16"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a5e8c0d25ae7c8eca843543199354ce16">range_y</a></td></tr>
<tr class="memdesc:a5e8c0d25ae7c8eca843543199354ce16"><td class="mdescLeft">&#160;</td><td class="mdescRight">The range of the LUT in y-direction. <br /></td></tr>
<tr class="separator:a5e8c0d25ae7c8eca843543199354ce16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4c9a05828df028bda2268787a12c6b3"><td class="memItemLeft" align="right" valign="top"><a id="aa4c9a05828df028bda2268787a12c6b3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">range_z</a></td></tr>
<tr class="memdesc:aa4c9a05828df028bda2268787a12c6b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The range of the LUT in z-direction. <br /></td></tr>
<tr class="separator:aa4c9a05828df028bda2268787a12c6b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a655a2a37c17dc50d2bba74ba501bba84"><td class="memItemLeft" align="right" valign="top"><a id="a655a2a37c17dc50d2bba74ba501bba84"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a655a2a37c17dc50d2bba74ba501bba84">offset_x</a></td></tr>
<tr class="memdesc:a655a2a37c17dc50d2bba74ba501bba84"><td class="mdescLeft">&#160;</td><td class="mdescRight">The offset in x-direction. <br /></td></tr>
<tr class="separator:a655a2a37c17dc50d2bba74ba501bba84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb4886f45cf005ce297ae1297ade8d19"><td class="memItemLeft" align="right" valign="top"><a id="afb4886f45cf005ce297ae1297ade8d19"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#afb4886f45cf005ce297ae1297ade8d19">offset_y</a></td></tr>
<tr class="memdesc:afb4886f45cf005ce297ae1297ade8d19"><td class="mdescLeft">&#160;</td><td class="mdescRight">The offset in y-direction. <br /></td></tr>
<tr class="separator:afb4886f45cf005ce297ae1297ade8d19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0b113c6ffb1f044e0fca0cbaafdd956"><td class="memItemLeft" align="right" valign="top"><a id="aa0b113c6ffb1f044e0fca0cbaafdd956"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#aa0b113c6ffb1f044e0fca0cbaafdd956">offset_z</a></td></tr>
<tr class="memdesc:aa0b113c6ffb1f044e0fca0cbaafdd956"><td class="mdescLeft">&#160;</td><td class="mdescRight">The offset in z-direction. <br /></td></tr>
<tr class="separator:aa0b113c6ffb1f044e0fca0cbaafdd956"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40c7090c6624456eb7453e9ca3340ec9"><td class="memItemLeft" align="right" valign="top"><a id="a40c7090c6624456eb7453e9ca3340ec9"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a></td></tr>
<tr class="memdesc:a40c7090c6624456eb7453e9ca3340ec9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the LUT in x-direction. <br /></td></tr>
<tr class="separator:a40c7090c6624456eb7453e9ca3340ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d9e7e945f704a7a870da490f9c8f41a"><td class="memItemLeft" align="right" valign="top"><a id="a2d9e7e945f704a7a870da490f9c8f41a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a></td></tr>
<tr class="memdesc:a2d9e7e945f704a7a870da490f9c8f41a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the LUT in y-direction. <br /></td></tr>
<tr class="separator:a2d9e7e945f704a7a870da490f9c8f41a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acedb18bb8f24ecd63f578b04b87980ca"><td class="memItemLeft" align="right" valign="top"><a id="acedb18bb8f24ecd63f578b04b87980ca"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#acedb18bb8f24ecd63f578b04b87980ca">size_z</a></td></tr>
<tr class="memdesc:acedb18bb8f24ecd63f578b04b87980ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the LUT in z-direction. <br /></td></tr>
<tr class="separator:acedb18bb8f24ecd63f578b04b87980ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79f6a576592ac907728c09aa01aba719"><td class="memItemLeft" align="right" valign="top"><a id="a79f6a576592ac907728c09aa01aba719"></a>
unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a></td></tr>
<tr class="memdesc:a79f6a576592ac907728c09aa01aba719"><td class="mdescLeft">&#160;</td><td class="mdescRight">The LUT data. <br /></td></tr>
<tr class="separator:a79f6a576592ac907728c09aa01aba719"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Look-up-table for fast surface normal quantization. </p>
<dl class="section author"><dt>作者</dt><dd>Stefan Holzer </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a3720afaa1a28cc7d0c985ef6ba8b9ed7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3720afaa1a28cc7d0c985ef6ba8b9ed7">&#9670;&nbsp;</a></span>initializeLUT()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::QuantizedNormalLookUpTable::initializeLUT </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>range_x_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>range_y_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>range_z_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initializes the LUT. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">range_x_arg</td><td>the range of the LUT in x-direction. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">range_y_arg</td><td>the range of the LUT in y-direction. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">range_z_arg</td><td>the range of the LUT in z-direction. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    {</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#af828a47f2a5a7e6df1896f4acec6f7a4">range_x</a> = range_x_arg;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a5e8c0d25ae7c8eca843543199354ce16">range_y</a> = range_y_arg;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">range_z</a> = range_z_arg;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a> = range_x_arg+1;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a> = range_y_arg+1;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#acedb18bb8f24ecd63f578b04b87980ca">size_z</a> = range_z_arg+1;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a655a2a37c17dc50d2bba74ba501bba84">offset_x</a> = range_x_arg/2;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#afb4886f45cf005ce297ae1297ade8d19">offset_y</a> = range_y_arg/2;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#aa0b113c6ffb1f044e0fca0cbaafdd956">offset_z</a> = range_z_arg;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;      <span class="comment">//if (lut != NULL) free16(lut);</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;      <span class="comment">//lut = malloc16(size_x*size_y*size_z);</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a> != NULL) </div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keyword">delete</span>[] <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;      <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a> = <span class="keyword">new</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>[<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a>*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a>*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#acedb18bb8f24ecd63f578b04b87980ca">size_z</a>];</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">int</span> nr_normals = 8;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        pcl::PointCloud&lt;PointXYZ&gt;::VectorType ref_normals (nr_normals);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;      </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">float</span> normal0_angle = 40.0f * 3.14f / 180.0f;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;      ref_normals[0].x = cosf (normal0_angle);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;      ref_normals[0].y = 0.0f;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;      ref_normals[0].z = -sinf (normal0_angle);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">float</span> inv_nr_normals = 1.0f / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (nr_normals);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> normal_index = 1; normal_index &lt; nr_normals; ++normal_index)</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;      {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">float</span> angle = 2.0f * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (M_PI * normal_index * inv_nr_normals);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        ref_normals[normal_index].x = cosf (angle) * ref_normals[0].x - sinf (angle) * ref_normals[0].y;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        ref_normals[normal_index].y = sinf (angle) * ref_normals[0].x + cosf (angle) * ref_normals[0].y;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        ref_normals[normal_index].z = ref_normals[0].z;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;      }</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;      <span class="comment">// normalize normals</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> normal_index = 0; normal_index &lt; nr_normals; ++normal_index)</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;      {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">float</span> length = std::sqrt (ref_normals[normal_index].x * ref_normals[normal_index].x +</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;                                        ref_normals[normal_index].y * ref_normals[normal_index].y +</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                                        ref_normals[normal_index].z * ref_normals[normal_index].z);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">float</span> inv_length = 1.0f / length;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        ref_normals[normal_index].x *= inv_length;</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        ref_normals[normal_index].y *= inv_length;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        ref_normals[normal_index].z *= inv_length;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;      }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;      <span class="comment">// set LUT</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> z_index = 0; z_index &lt; <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#acedb18bb8f24ecd63f578b04b87980ca">size_z</a>; ++z_index)</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;      {</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y_index = 0; y_index &lt; <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a>; ++y_index)</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        {</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x_index = 0; x_index &lt; <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a>; ++x_index)</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;          {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            PointXYZ normal (<span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (x_index - <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#af828a47f2a5a7e6df1896f4acec6f7a4">range_x</a>/2), </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                             <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (y_index - <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a5e8c0d25ae7c8eca843543199354ce16">range_y</a>/2), </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                             <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (z_index - <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">range_z</a>));</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">float</span> length = std::sqrt (normal.x*normal.x + normal.y*normal.y + normal.z*normal.z);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">float</span> inv_length = 1.0f / (length + 0.00001f);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            normal.x *= inv_length;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            normal.y *= inv_length;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            normal.z *= inv_length;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;            <span class="keywordtype">float</span> max_response = -1.0f;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;            <span class="keywordtype">int</span> max_index = -1;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> normal_index = 0; normal_index &lt; nr_normals; ++normal_index)</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">float</span> response = normal.x * ref_normals[normal_index].x +</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                                     normal.y * ref_normals[normal_index].y +</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                                     normal.z * ref_normals[normal_index].z;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">float</span> abs_response = fabsf (response);</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;              <span class="keywordflow">if</span> (max_response &lt; abs_response)</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;              {</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                max_response = abs_response;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                max_index = normal_index;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;              }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;              <a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a>[z_index*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a>*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a> + y_index*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a> + x_index] = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (0x1 &lt;&lt; max_index);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;          }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        }</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;      }</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    }</div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_a2d9e7e945f704a7a870da490f9c8f41a"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">pcl::QuantizedNormalLookUpTable::size_y</a></div><div class="ttdeci">int size_y</div><div class="ttdoc">The size of the LUT in y-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:144</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_a40c7090c6624456eb7453e9ca3340ec9"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">pcl::QuantizedNormalLookUpTable::size_x</a></div><div class="ttdeci">int size_x</div><div class="ttdoc">The size of the LUT in x-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:142</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_a5e8c0d25ae7c8eca843543199354ce16"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#a5e8c0d25ae7c8eca843543199354ce16">pcl::QuantizedNormalLookUpTable::range_y</a></div><div class="ttdeci">int range_y</div><div class="ttdoc">The range of the LUT in y-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:130</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_a655a2a37c17dc50d2bba74ba501bba84"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#a655a2a37c17dc50d2bba74ba501bba84">pcl::QuantizedNormalLookUpTable::offset_x</a></div><div class="ttdeci">int offset_x</div><div class="ttdoc">The offset in x-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:135</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_a79f6a576592ac907728c09aa01aba719"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">pcl::QuantizedNormalLookUpTable::lut</a></div><div class="ttdeci">unsigned char * lut</div><div class="ttdoc">The LUT data.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:149</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_aa0b113c6ffb1f044e0fca0cbaafdd956"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#aa0b113c6ffb1f044e0fca0cbaafdd956">pcl::QuantizedNormalLookUpTable::offset_z</a></div><div class="ttdeci">int offset_z</div><div class="ttdoc">The offset in z-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:139</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_aa4c9a05828df028bda2268787a12c6b3"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">pcl::QuantizedNormalLookUpTable::range_z</a></div><div class="ttdeci">int range_z</div><div class="ttdoc">The range of the LUT in z-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:132</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_acedb18bb8f24ecd63f578b04b87980ca"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#acedb18bb8f24ecd63f578b04b87980ca">pcl::QuantizedNormalLookUpTable::size_z</a></div><div class="ttdeci">int size_z</div><div class="ttdoc">The size of the LUT in z-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:146</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_af828a47f2a5a7e6df1896f4acec6f7a4"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#af828a47f2a5a7e6df1896f4acec6f7a4">pcl::QuantizedNormalLookUpTable::range_x</a></div><div class="ttdeci">int range_x</div><div class="ttdoc">The range of the LUT in x-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:128</div></div>
<div class="ttc" id="astructpcl_1_1_quantized_normal_look_up_table_html_afb4886f45cf005ce297ae1297ade8d19"><div class="ttname"><a href="structpcl_1_1_quantized_normal_look_up_table.html#afb4886f45cf005ce297ae1297ade8d19">pcl::QuantizedNormalLookUpTable::offset_y</a></div><div class="ttdeci">int offset_y</div><div class="ttdoc">The offset in y-direction.</div><div class="ttdef"><b>Definition:</b> surface_normal_modality.h:137</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a4cd6a5749e1c5563eab97da895f7cb08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4cd6a5749e1c5563eab97da895f7cb08">&#9670;&nbsp;</a></span>operator()() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char pcl::QuantizedNormalLookUpTable::operator() </td>
          <td>(</td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Operator to access an element in the LUT. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>the x-component of the normal. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>the y-component of the normal. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">z</td><td>the z-component of the normal. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    {</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">size_t</span> x_index = <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span> (x * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a655a2a37c17dc50d2bba74ba501bba84">offset_x</a>) + <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a655a2a37c17dc50d2bba74ba501bba84">offset_x</a>));</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">size_t</span> y_index = <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span> (y * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#afb4886f45cf005ce297ae1297ade8d19">offset_y</a>) + <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#afb4886f45cf005ce297ae1297ade8d19">offset_y</a>));</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">size_t</span> z_index = <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span> (z * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">range_z</a>) + <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#aa4c9a05828df028bda2268787a12c6b3">range_z</a>));</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">size_t</span> index = z_index*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a2d9e7e945f704a7a870da490f9c8f41a">size_y</a>*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a> + y_index*<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a40c7090c6624456eb7453e9ca3340ec9">size_x</a> + x_index;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;      <span class="keywordflow">return</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a>[index]);</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ab47ece678e8ab9805b80c9772530e689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab47ece678e8ab9805b80c9772530e689">&#9670;&nbsp;</a></span>operator()() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char pcl::QuantizedNormalLookUpTable::operator() </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Operator to access an element in the LUT. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the index of the element. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    {</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;      <span class="keywordflow">return</span> (<a class="code" href="structpcl_1_1_quantized_normal_look_up_table.html#a79f6a576592ac907728c09aa01aba719">lut</a>[index]);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该结构体的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/<a class="el" href="surface__normal__modality_8h_source.html">surface_normal_modality.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="structpcl_1_1_quantized_normal_look_up_table.html">QuantizedNormalLookUpTable</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
